package com.example.demo.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.Contact;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Swagger/OpenAPI 配置
 */
@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("Spring Boot APM Demo API")
                        .version("1.0.0")
                        .description("集成了 SkyWalking 和 SonarQube 的 Spring Boot 示例项目")
                        .contact(new Contact()
                                .name("APM Demo Team")
                                .email("demo@example.com")));
    }
}

